package com.catering.pojo.VO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {
    private Integer code;
    private String msg;
    private Object data;

    public static final Result OK(String msg,Object data){
        Result result=new Result();
        result.setCode(200);
        result.setData(data);
        result.setMsg(msg);
        return result;
    }
    public static final Result ERR(String msg,Object data){
        Result result=new Result();
        result.setCode(400);
        result.setData(data);
        result.setMsg(msg);
        return result;
    }

}
